import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter( {
  history: createWebHistory( import.meta.env.BASE_URL ),
  routes: [
    {
      path: '/',
      name: 'login',
      component:()=> import('../views/ljs/Login.vue')
    },
    {
      path: '/login',
      redirect: '/'
    },
    {
      path: '/register',
      component: () => import( '../views/ljs/register.vue' )
    },
    {
      path: '/passwordLogin',
      component: () => import( '../views/ljs/passwordLogin.vue' )
    },
    {
      path: '/homeview',
      name: 'homeview',
      component: HomeView,
      children: [
        {
          path: '/',
          redirect: '/home'
        },
        {
          path: '/home',
          component: () => import( '../views/lmy/Index.vue' )
        },
        {
          path: '/mine',
          component: () => import( '../views/hwy/Index.vue' )
        },
        {
          path: '/message',
          component: () => import( '../views/xhx/Index.vue' )
        },
        {
          path: '/concern',
          component: () => import( '../views/wqj/Index.vue' )
        },
        {
          path: '/video',
          component: () => import( '../views/video/Video.vue' )
        }
      ]
    },

  ]
} )

export default router
